package com.bestcem.xm.ticket.service.manager.record.dto;

import com.bestcem.xm.ticket.entity.mongo.TicketRecord;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 跟进 工单进度自定义参数
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @date 2021/8/18 15:35
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class FollowedCustomAttrDTO {
    /**
     * content
     */
    private String content;
    /**
     * isCompleted
     */
    private Boolean isCompleted;
    /**
     * custom_fields
     */
    private List<TicketRecord.CustomAttr.CustomField> customFields;

    /**
     * 获取工单跟进进度自定义参数
     *
     * @return 工单跟进进度自定义参数
     * @author XiaoYunSong <ys.xiao@idiaoyan.com>
     * @date 2021/8/19 11:28
     */
    public TicketRecord.CustomAttr getCustomAttr() {
        TicketRecord.CustomAttr customAttr = new TicketRecord.CustomAttr();
        customAttr.setContent(this.content);
        customAttr.setIsCompleted(this.isCompleted);
        customAttr.setCustomFields(this.customFields);
        return customAttr;
    }
}